﻿

// client ids

var tdTabSearchClientID = 'ctl00_MainContent_tdTabSearch';
var tdTabReporsClientID = 'ctl00_MainContent_tdTabReports';
var tdTabApplicationsClientID = 'ctl00_MainContent_tdTabApplications';


//var AccordionContainerClientID = 'ctl00_MainContent_AccordionContainer';
var divSearchContainerID = 'ctl00_MainContent_Search';
var divApplicationsClientID = 'ctl00_MainContent_divApplications';
var divReportsContentClientID = 'ctl00_MainContent_Repotrs';







function ChangeTabStatus(obj,bInitial)
{
    switch(obj.id) {
        case tdTabSearchClientID:
             if(obj.className=="TabSearchSelected")
            return; obj.className = "TabSearchSelected"; 
         //   document.getElementById(tdTabLayersClientID).className = "TabLayers";
             document.getElementById(tdTabReporsClientID).className = "TabReports";
            document.getElementById(tdTabApplicationsClientID).className = "TabApplications";
            document.getElementById(divSearchContainerID).style.display = 'inline';
          /*  document.getElementById(divLayersTabClientID).style.display = 'none';*/
            document.getElementById(divApplicationsClientID).style.display = 'none';
           // Map_divLayersTab_Visible = false;
            //document.getElementById(divPersonalAreaClientID).style.display = 'none';
            document.getElementById(divApplicationsClientID).style.display = 'none';
           ; break;

       case tdTabReporsClientID: 
        if (obj.className == "TabReportsSelected")
            return;

        obj.className = "TabReportsSelected";
               
           //   document.getElementById(tdTabLayersClientID).className = "TabLayers";
        document.getElementById(tdTabSearchClientID).className = "TabSearch";
           document.getElementById(tdTabApplicationsClientID).className = "TabApplications";
           document.getElementById(divSearchContainerID).style.display = 'none';
           document.getElementById(divReportsContentClientID).style.display = 'inline';
           document.getElementById(divApplicationsClientID).style.display = 'none';
           //document.getElementById(//).style.display = 'none';
          /* Map_divLayersTab_Visible = false;*/
           //document.getElementById(divPersonalAreaClientID).style.display = 'none';
       
           ; break;
            /* return; document.getElementById(tdTabSearchClientID).className = "TabSearch";
        
            document.getElementById(tdTabApplicationsClientID).className = "TabApplications";
            obj.className = "TabLayersSelected";
            document.getElementById(AccordionContainerClientID).style.display = 'none';
            document.getElementById(divPersonalAreaClientID).style.display = 'none';
            if (bInitial != true) {
            document.getElementById(divLayersTabClientID).style.display = 'inline';*/
            /*}

            Map_divLayersTab_Visible = true;
            document.getElementById(divApplicationsClientID).style.display = 'none';
            document.getElementById(PanelSearchEmptyContentClientID).style.display = 'inline';*/
                break;
        
       case tdTabApplicationsClientID:if(obj.className=="TabApplicationsSelected")
               return;
           obj.className = "TabApplicationsSelected";
           document.getElementById(tdTabSearchClientID).className = "TabSearch";
           document.getElementById(tdTabReporsClientID).className = "TabReports";

           document.getElementById(divSearchContainerID).style.display = 'none';
           document.getElementById(divReportsContentClientID).style.display = 'none';
           document.getElementById(divApplicationsClientID).style.display = 'inline';
           /* document.getElementById(tdTabSearchClientID).className = "TabSearch";
           document.getElementById(tdTabLayersClientID).className = "TabLayers";
         
            obj.className = "TabApplicationsSelected";
            document.getElementById(AccordionContainerClientID).style.display = 'none';
            document.getElementById(divLayersTabClientID).style.display = 'none'; 
             Map_divLayersTab_Visible = false;
             document.getElementById(divPersonalAreaClientID).style.display = 'none';
             document.getElementById(divApplicationsClientID).style.display = 'inline';
              document.getElementById(PanelSearchEmptyContentClientID).style.display='none';*/break;}}


function ChangeTabStyle(obj,bIsMouseOver) {

switch(obj.id) {

    case tdTabSearchClientID:
        if (obj.className == 'TabSearchSelected')
            return; else if (bIsMouseOver)
            obj.className = "TabSearchMo";
        else
            obj.className = "TabSearch"; break;
    case tdTabReporsClientID:
        if (obj.className == 'TabReportsSelected')
            return; 
            else if (bIsMouseOver)
                obj.className = "TabReportsMo";
            else obj.className = "TabReports"; break;

        case tdTabApplicationsClientID:
            if (obj.className == 'TabApplicationsSelected')
                return;
            else if (bIsMouseOver)
                obj.className = "TabApplicationsMo";
            else obj.className = "TabApplications"; break;
    }
            }



         

           
